package com.toolsder.demo.spring.security.jwt.repository;

import com.toolsder.demo.spring.security.jwt.entity.database.User;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * created by Qk on 2020/2/2
 *
 * @author by 猴子请来的逗比
 */
public interface UserRepository extends JpaRepository<User, Long> {

    /**
     * 检测雇员对应的用户是否已经存在
     */
    boolean existsByUsername(String username);

    /**
     * 获取雇员对应的用户
     */
    User findByUsername(String username);


}
